package practice01;

import java.util.Scanner;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: practice01
 * @ClassName: TestAdminMrg
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/1 14:35
 * @Copyright 大牛版板所有
 */
public class TestAdminMrg {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        AdminMrg admin = new AdminMrg();
        System.out.print("请输入用户名：");
        admin.adminName = input.next();
        System.out.print("请输入密码：");
        admin.password = input.next();
        boolean flag = admin.modifyPaw();
        if (flag){
            System.out.print("\n请输入新密码：");
            String newPassword = input.next();
            System.out.println("修改密码成功，你的新密码为："+newPassword);
        }
        else {
            System.out.println("\n用户和密码不匹配！你没有权限更新管理员信息。");
        }
    }
}
